package com.jia.product.controller;


import com.jia.product.service.AttrAttrGroupRelationService;
import com.jia.product.vo.AttrGroupRelationVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * 属性&属性分组关联(AttrAttrGroupRelation)表控制层
 *
 * @author makejava
 * @since 2025-07-08 18:15:25
 */
@RestController
@RequestMapping("attr/attr/group/relation")
public class AttrAttrGroupRelationController {
    /**
     * 服务对象
     */
    @Resource
    private AttrAttrGroupRelationService attrAttrGroupRelationService;


    @DeleteMapping("/delete/list")
    public String deleteAttrGroupRelations(@RequestBody List<AttrGroupRelationVo> attrRelationIds) {
        attrAttrGroupRelationService.deleteBatch(attrRelationIds);
        return "success";
    }

    @PostMapping("/insert/list")
    public String addAttrGroupRelations(@RequestBody List<AttrGroupRelationVo> attrRelationIds) {
        attrAttrGroupRelationService.insertBatch(attrRelationIds);
        return "success";
    }

}

